﻿#region NeoPatterns
// 
// NeoPatterns framework is released under LGPLv3 license.
// See http://www.opensource.org/licenses/lgpl-3.0.html for more details.
// 
// Please visit http://neopatterns.wikidot.com for more information about NeoPatterns
// 
// Copyright (c) Pascal Craponne 2008
// 
#endregion

using System;
using System.Reflection;

namespace NeoPatterns.Core.Aop
{
    /// <summary>
    /// Selector allows to include or exclude specified reflection object
    /// Used by interceptors to know which reflection object to intercept, for example
    /// </summary>
    public interface IPointcut
    {
        /// <summary>
        /// Early Select: allows to know if we select an object using its type and name
        /// </summary>
        /// <param name="type"></param>
        /// <param name="objectName"></param>
        /// <returns></returns>
        bool Select(Type type, string objectName);

        /// <summary>
        /// Checks if the provided MethodInfo (Type, MethodBase, etc.) and name can be used.
        /// </summary>
        /// <param name="memberInfo">Type for class, PropertyInfo/FieldInfo for class members</param>
        /// <returns></returns>
        bool Select(MemberInfo memberInfo);
    }
}